# image.py
import pygame

def load(image_path, size=None, flip=False):
    image = pygame.image.load(image_path)
    if size:
        image = pygame.transform.scale(image, size)
    if flip:
        image = pygame.transform.flip(image, True, False)
    return image

def draw(surface, image, position, pos_mode="center"):
    if pos_mode == "center":
        rect = image.get_rect(center=position)
    surface.blit(image, rect)